package com.timsmeet.timeperiod;

import java.util.Calendar;
/*
TimeRange as an implementation of TimePeriod defines the time period by its Start and End; 
the duration is calculated from these:                                                                                                                                                                    
                                                                                                                                                                    
                 +--------------+                                                                                                                                   
                 |  TimeRange   |                                                                                                                                   
                 +--------------+                                                                                                                                   
                 |              |                                                                                                                                   
             |   |              |                                                                                                                                   
             |<--|              |                                                                                                                                   
change       +------------------+                                                                                                                                   
start        |                  |                                                                                                                                   
             +------------------+                                                                                                                                   
                 |              |                                                                                                                                   
                 |              |   |                                                                                                                               
                 |              |-->|                                                                                                                               
change           +------------------+                                                                                                                               
end              |                  |                                                                                                                               
                 +------------------+                                                                                                                               
                 |              |                                                                                                                                   
                 |              |   |                                                                                                                               
                 |<-------------|-->|                                                                                                                               
change           +------------------+                                                                                                                              
duration         |                  |                                                                                                                              
                 +------------------+                                                                                                                               
                                                                                                                                                                    

                                                                                                                                                                    
A TimeRange can be created by specifying its Start/End, Start/Duration, or Duration/End. 
If required, the given Start and End will be sorted chronologically.
                                         
*/
public interface TimeRange extends TimePeriod {

	void expandStartTo(Calendar moment);
	void expandEndTo(Calendar moment);
	void expandTo(Calendar moment);
	void expandTo(TimePeriod period);
	void shrinkStart(Calendar moment);
	void shrinkEnd(Calendar moment);
	void shrinkTo(TimePeriod period);
	TimeRange getIntersection(TimePeriod period);
}
